//
//  NearTheShopViewCollectionViewCell.m
//  BaseFrame
//
//  Created by 吕金状 on 2017/8/7.
//  Copyright © 2017年 com.mxh. All rights reserved.
//

#import "NearTheShopViewCollectionViewCell.h"

@interface NearTheShopViewCollectionViewCell ()

@property (nonatomic , strong)UILabel *titleNameLabel;
Strong UIView *lineView;

@end

@implementation NearTheShopViewCollectionViewCell


- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _titleNameLabel = [[UILabel alloc]init];
        _titleNameLabel.font = DEF_FontSize_14;
        _titleNameLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_titleNameLabel];
        _lineView = [[UIView alloc]init];
        _lineView.backgroundColor = getColor(dividerColor);
        [self.contentView addSubview:_lineView];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.titleNameLabel.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
    self.lineView.frame = CGRectMake(self.bounds.size.width, 5 / WIDTH_5S_SCALE, 0.5, self.bounds.size.height - 10 / WIDTH_5S_SCALE);
}

- (void)setModel:(NSDictionary *)model{
    _model = model;
    self.lineView.hidden = YES;
//    if (self.indexPath.row == 3) {
//        self.lineView.hidden = YES;
//    }
    self.titleNameLabel.text = model[@"lm_name"];
    self.titleNameLabel.textColor = getColor(model[@"textColor"]);
}
@end
